package com.wbihua.common.metrics.manager;

import com.wbihua.common.metrics.config.MeterConfig;
import com.wbihua.common.metrics.constant.MetricConstant;
import com.wbihua.common.metrics.metric.*;
import com.wbihua.common.metrics.type.*;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Tags;

public interface MetricManager {
    MeterConfig getMeterConfig();
    MeterRegistry getMetricRegistry();
    void registryEventMeterCounter(EventMeterCounter counter);
    EventMeterCounter getEventMeterCounter(EventCounterType counterType);
    void registryEventMeterGauge(EventMeterGauge gauge);
    EventMeterGauge getEventMeterGauge(EventGaugeType gaugeType);
    void registryEventMeterTimer(EventMeterTimer timer);
    EventMeterTimer getEventMeterTimer(EventTimerType timerType);
    void registryEventMeterSummary(EventMeterSummary summary);
    EventMeterSummary getEventMeterSummary(EventSummaryType summaryType);

    void registryEventMeterPrometheusSummary(EventMeterPrometheusSummary prometheusSummary);
    EventMeterPrometheusSummary getEventMeterPrometheusSummary(EventPrometheusSummaryType summaryType);
    void registryEventMeterPrometheusHistogram(EventMeterPrometheusHistogram prometheusHistogram);
    EventMeterPrometheusHistogram getEventMeterPrometheusHistogram(EventPrometheusHistogramType histogramType);
    default Tags getTags() {
        return Tags.empty().and(MetricConstant.COMMON_TAG_NAME, MetricConstant.COMMON_TAG_VALUE);
    }
}
